/** @var string Directory */
protected $dbDir;
-
/** @var string File name for SQLite database file */
protected $dbPath;
-
/** @var string Transaction mode */
protected $trxMode;
/** @var int The number of rows affected as an integer */
protected $mAffectedRows;
-
/** @var resource */
protected $mLastResult;
/** @var $mConn PDO */
+ protected $mConn;
/** @var FSLockManager (hopefully on the same server as the DB) */
protected $lockMgr;
* @param string $dbName
*
* @throws DBConnectionError
- * @return PDO
+ * @return bool
*/
function open( $server, $user, $pass, $dbName ) {
$this->close();
}
$this->openFile( $fileName );
- return $this->mConn;
+ return (bool)$this->mConn;
}
/**
* @param string $table
* @param string $index
* @param string $fname
- * @return array
+ * @return array|false
*/
function indexInfo( $table, $index, $fname = __METHOD__ ) {
$sql = 'PRAGMA index_info(' . $this->addQuotes( $this->indexName( $index ) ) . ')';
$res = $this->query( $sql, $fname );
- if ( !$res ) {
- return null;
- }
- if ( $res->numRows() == 0 ) {
+ if ( !$res || $res->numRows() == 0 ) {
return false;
}
$info = [];